package cn.walls1717.wallsmall.product.service;

import cn.walls1717.wallsmall.common.utils.PageUtils;
import cn.walls1717.wallsmall.product.entity.AttrGroupEntity;
import cn.walls1717.wallsmall.product.vo.AttrGroupWithAttrsVO;
import cn.walls1717.wallsmall.product.vo.SpuItemAttrGroupVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author walls1717
 * @email walls1717@163.com
 * @date 2022-10-21 11:26:47
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    /**
     * 分页列表
     *
     * @param params 分页参数
     * @param catelogId catelogId
     * @return 分页数据
     */
    PageUtils listPages(Map<String, Object> params, Integer catelogId);

    /**
     * 获取分类下所有分组&关联属性
     *
     * @param catalogId 分类id
     */
    List<AttrGroupWithAttrsVO> listAttrGroupsWithAttrs(Long catalogId);

    /**
     * 根据spuId与catalogId获取分组与属性相关信息
     *
     * @param spuId spuId
     * @param catalogId catalogId
     * @return SpuItemAttrGroupVO
     */
    List<SpuItemAttrGroupVO> listAttrGroupsWithAttrsBySpuIdCatalogId(Long spuId, Long catalogId);
}
